from rest_framework import mixins
from rest_framework.viewsets import ReadOnlyModelViewSet

from .models import Background, Category, IDPhoto
from .serializers import (BackgroundSerializer, CategorySerializer,
                          IDPhotoSerializer)


# Create your views here.
class BackgroundView(ReadOnlyModelViewSet):
    """证件照背景颜色视图，包括list和retrive"""

    queryset = Background.objects.all()
    serializer_class = BackgroundSerializer


class CategoryView(ReadOnlyModelViewSet):
    """证件照类型视图"""

    queryset = Category.objects.all()
    serializer_class = CategorySerializer


class IDPhotoView(ReadOnlyModelViewSet):
    """证件照尺寸视图"""

    queryset = IDPhoto.objects.all()
    serializer_class = IDPhotoSerializer

